package slim3.controller.admin;

import org.slim3.controller.Controller;
import org.slim3.controller.Navigation;
import org.slim3.util.BeanUtil;

import slim3.model.Post;
import slim3.service.PostService;

public class InsertController extends Controller {

    private PostService service = new PostService();
    
    @Override
    public Navigation run() throws Exception {
        Post post = new Post();
        BeanUtil.copy(request, post);
        service.insert(post);
        return redirect("../result.html");
    }
}
